# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-ev
pkgver=4.34
pkgrel=1
pkgdesc='perl interface to libev, a high performance full-featured event loop'
arch=('loong64' 'x86_64')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-common-sense')
makedepends=('perl-canary-stability')
url='https://metacpan.org/release/EV'
source=("https://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/EV-$pkgver.tar.gz")
sha512sums=('938f675ec960be40ebe98416450b2d8866581250560b4b6781cd36926e360ab2b3f8d4cc39145ed068753b9952e5c220316cefd4d99a6ca63c2bfde56329306e')

build() {
  cd EV-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd EV-$pkgver
  make test
}

package() {
  cd EV-$pkgver
  make install DESTDIR="$pkgdir"
}
